import * as request from "@/utils/request"

const API_PREFIX = "/Auth"

/**
 * 登录
 */
export function userLogin(params: AuthLoginRequest) {
  return request.post<AuthLoginResponse>({
    url: API_PREFIX + "/Login",
    data: params
  })
}

/**
 * 登出
 */
export function userLoginOut() {
  return request.post<boolean>({
    url: API_PREFIX + "/LoginOut"
  })
}

/**
 * 刷新token
 */
export function refreshToken(params: AuthRefreshTokenRequest) {
  return request.get({
    url: API_PREFIX + "/RefreshToken",
    params
  })
}
